var subsets = function(nums) {
    let res = [] 
    let curr = []
    let len = nums.length
    let vis = {}
    function dfs(count) {
        res.push([...curr])
        for(let i = 0; i < len; i++) { // 入参是nums中的数字索引
            
                curr.push(nums[i])
                dfs(count + 1)
                curr.pop()
        }
    }
    dfs(0)
    return res
    };
   